﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace CodeWriterHelper.Objects
{
    [Serializable]
    public class CodeReplaceEntry : INotifyPropertyChanged
    {
        private string _stringToReplace = null;
        public string StringToReplace
        {
            get
            {
                return _stringToReplace;
            }
            set
            {
                _stringToReplace = value;
                RaisePropertyChanged("StringToReplace");
            }
        }

        private string _newString = null;
        public string NewString
        {
            get
            {
                return _newString;
            }
            set
            {
                _newString = value;
                RaisePropertyChanged("NewString");
            }
        }

        #region PropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;
        public void RaisePropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion PropertyChanged
    }
}
